package com.demo.dao_admin;

import java.awt.print.Pageable;
import java.util.List;

import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.demo.entity.LecturerData;

@Repository("adminLecturerDAO")
public interface LecturerDAO extends JpaRepository<LecturerData, Long>, 
				JpaSpecificationExecutor<LecturerData>{

	@Query("from LecturerData")
	@EntityGraph(value = "Lecturer.a", type = EntityGraph.EntityGraphType.FETCH)
	List<LecturerData> findAll(Pageable pageable);
}
